:root {
  --primary: #2196f3;
  --secondary: #ff4081;
  --background: #1a1a1a;
  --text: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.1);
  --gradient: linear-gradient(45deg, var(--primary), var(--secondary));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  perspective: 1000px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--background);
  color: var(--text);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 3D Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-title {
  font-size: 5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* 3D Grid Background */
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(60deg) scale(2);
  pointer-events: none;
}

.grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
}

.vertical {
  width: 1px;
  height: 100%;
  transform: translateZ(0);
}

.horizontal {
  height: 1px;
  width: 100%;
  transform: translateZ(0);
}

/* Interactive Buttons */
.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  margin: 0.5rem;
  background: var(--gradient);
  color: var(--text);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
}

.cta-button:hover {
  transform: translateY(-5px) rotateX(10deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.cta-button:hover::before {
  transform: translateX(0);
}

/* 3D Feature Cards */
.features {
  padding: 6rem 0;
  perspective: 1000px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  transform-style: preserve-3d;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.feature-card:hover {
  transform: translateZ(50px) rotateX(10deg) rotateY(10deg);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 3D Categories */
.categories {
  padding: 6rem 0;
  perspective: 1000px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  transform-style: preserve-3d;
}

.category-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.category-card:hover {
  transform: translateZ(30px) rotateY(10deg);
}

.category-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.category-card:hover .category-icon {
  transform: translateZ(20px) rotateY(-10deg);
}

/* Animated Stats */
.stats {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.stat-card:hover {
  transform: translateZ(20px);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotateX(0);
  }
  50% {
    transform: translateY(-20px) rotateX(5deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .features-grid,
  .category-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card:hover,
  .category-card:hover {
    transform: translateZ(20px);
  }
}
